{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "# 衡量回归算法的标准"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn import datasets"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 波士顿房产数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "boston = datasets.load_boston()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Boston House Prices dataset\n===========================\n\nNotes\n------\nData Set Characteristics:  \n\n    :Number of Instances: 506 \n\n    :Number of Attributes: 13 numeric/categorical predictive\n    \n    :Median Value (attribute 14) is usually the target\n\n    :Attribute Information (in order):\n        - CRIM     per capita crime rate by town\n        - ZN       proportion of residential land zoned for lots over 25,000 sq.ft.\n        - INDUS    proportion of non-retail business acres per town\n        - CHAS     Charles River dummy variable (= 1 if tract bounds river; 0 otherwise)\n        - NOX      nitric oxides concentration (parts per 10 million)\n        - RM       average number of rooms per dwelling\n        - AGE      proportion of owner-occupied units built prior to 1940\n        - DIS      weighted distances to five Boston employment centres\n        - RAD      index of accessibility to radial highways\n        - TAX      full-value property-tax rate per $10,000\n        - PTRATIO  pupil-teacher ratio by town\n        - B        1000(Bk - 0.63)^2 where Bk is the proportion of blacks by town\n        - LSTAT    % lower status of the population\n        - MEDV     Median value of owner-occupied homes in $1000's\n\n    :Missing Attribute Values: None\n\n    :Creator: Harrison, D. and Rubinfeld, D.L.\n\nThis is a copy of UCI ML housing dataset.\nhttp://archive.ics.uci.edu/ml/datasets/Housing\n\n\nThis dataset was taken from the StatLib library which is maintained at Carnegie Mellon University.\n\nThe Boston house-price data of Harrison, D. and Rubinfeld, D.L. 'Hedonic\nprices and the demand for clean air', J. Environ. Economics & Management,\nvol.5, 81-102, 1978.   Used in Belsley, Kuh & Welsch, 'Regression diagnostics\n...', Wiley, 1980.   N.B. Various transformations are used in the table on\npages 244-261 of the latter.\n\nThe Boston house-price data has been used in many machine learning papers that address regression\nproblems.   \n     \n**References**\n\n   - Belsley, Kuh & Welsch, 'Regression diagnostics: Identifying Influential Data and Sources of Collinearity', Wiley, 1980. 244-261.\n   - Quinlan,R. (1993). Combining Instance-Based and Model-Based Learning. In Proceedings on the Tenth International Conference of Machine Learning, 236-243, University of Massachusetts, Amherst. Morgan Kaufmann.\n   - many more! (see http://archive.ics.uci.edu/ml/datasets/Housing)\n\n"
     ]
    }
   ],
   "source": [
    "print(boston.DESCR)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 只取其中一个特征来进行简单线性回归的试验"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['CRIM', 'ZN', 'INDUS', 'CHAS', 'NOX', 'RM', 'AGE', 'DIS', 'RAD',\n       'TAX', 'PTRATIO', 'B', 'LSTAT'],\n      dtype='<U7')"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "boston.feature_names"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "我们只取第5个特征RM"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = boston.data[:,5] # 只使用房间数量这个特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(506,)"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.shape(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(506,)"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = boston.target\n",
    "np.shape(y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAIABJREFUeJztnW2QXOWV3/9nWhfUg3dpgScUNMhiNykpy2qlMVOGXTauSGTR2th4SmAwhbdIyhXywZUYm5q1nHKM2CJBG8UBf0h5i7KTZQsbC4Q95qXWImWUpJYq5EgMWlYLStnmRW6wkRc1NlIjemZOPnTf1u2e+9z73Nv39n3p/69KNaN+uc+5t6fP89xz/s85oqoghBBSfCayNoAQQkgy0KETQkhJoEMnhJCSQIdOCCElgQ6dEEJKAh06IYSUBDp0QggpCXTohBBSEujQCSGkJKwa5WDvf//7dd26daMckhBCCs+hQ4d+qapTYa8bqUNft24dDh48OMohCSGk8IjIqzavY8iFEEJKAh06IYSUBDp0QggpCXTohBBSEujQCSGkJFipXETkFQC/BrAEYFFVZ0TkPAB7AKwD8AqAG1X1RDpmkmGZX2hg976jeL3ZwkW1Kua2rcfsdD1rs4Yi6XMa5TVKcqxRf7ZJjecep9FsoSKCJdXez0lnAq3FZagCFRHcfMUluHt249DjD753y4Yp7H/peKKfg/d86iP+rolNx6KuQ59R1V96HvvPAN5S1V0isgPAGlX9YtBxZmZmlLLF0TO/0MCXvvsCWu2l3mNVp4J7tm8srFNP+pxGeY2SHGvUn21S4/kdJ4xPX7kWMx84L/b4NmMm+TkMe0wvInJIVWfCXjdMyOUTAB7o/v4AgNkhjkVSZPe+oyv+0FrtJezedzQji4Yn6XMa5TVKcqxRf7ZJjed3nDAeOn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DeDvMzQpbW5GScMtXV4DcKWITIqIoPN5vpixTakgIv+o+3MtOvHzb9u+lyqX8eMCAN/rfCewCsC3VfUH2ZqUGv8WwLe64YifAvhXGduTCt2J+Y8A/JusbUkLVT0gInsBPAdgEcACyrtj9FEROR9AG8BnoyTzuVOUEEJKAkMuhBBSEujQCSGkJNChE0JISaBDJ4SQkkCHTgghJYEOnRBCSgIdOiGElAQ6dEIIKQn/H+mq6iiS4bK6AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1087c8a58>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x,y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "np.max(y)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "从上图中可以看到，有若干点的y轴坐标都是50，它们有可能是各种原因下，超出统计范围后给出的最大值，因此我们需要把这些点去掉。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAIABJREFUeJzt3X+MXNWVJ/Dv6epnu9pkKEN6EC5w7ElGZsN67R5aCTOejRZngneGQFpAcLKZCK2iZf+IdgMT9YyRUGxGrHDUm4VIuxoJTXaHUQgxv9KBWIoZxcyOFglm7bQd4gHvTBJ+pCDBM3E7E7qwq7vP/lH12q+r3n3vvlfv1ftR34+EsMv141Z116lb5557rqgqiIio+EayHgARESWDAZ2IqCQY0ImISoIBnYioJBjQiYhKggGdiKgkGNCJiEqCAZ2IqCQY0ImISm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WwDOquqz2Y4qFT8E8K9F5FIRGQPwBwCutL0xAzoAEfk4gLdV9VjWYxmQ31XV3wLw+wA+LyIfyXpAKRgF8FsA/kxVJwC8A2BvtkNKTyeldBOAx7MeSxpEZAOAT6D9Qb0RwHoR+cNsR5U8VX0ZwJcBPAvguwCOA1iyvT0DettOADeJyKsAvglgl4h8Pdshpacz24Gqvo12vvVD2Y4oFT8F8FNVfbHz9yfQDvBl9fsAvq+qP896ICn5PQA/UdXTqtoC8BSA38l4TKlQ1a+p6jWq+hEAZwD8P9vbMqADUNW7VfUKVd2M9tfWI6pauk9/ABCR9SLyHvfPAK5H+2teqajqzwC8ISLuCdMfBfB3GQ4pbZ9GSdMtHa8DuFZExkRE0P55vpzxmFIhIr/e+f8mtPPn37C9Latchs9lAL7Vfk9gFMA3VPW72Q4pNf8JwCOddMSPAfz7jMeTis4H88cA/Mesx5IWVX1RRJ4A8H0AiwDmUN4do0+KyKUAWgA+H2UxnztFiYhKgikXIqKSYEAnIioJBnQiopJgQCciKgkGdCKikmBAJyIqCQZ0IqKSYEAnIiqJ/w8hKvWu+ccrRAAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x103842240>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x = x[y<50.0]\n",
    "y = y[y<50.0]\n",
    "\n",
    "plt.scatter(x,y)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 使用简单线性回归法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "from c1_knn import model_selection\n",
    "x_train, x_test, y_train, y_test = model_selection.train_test_split(x, y, seed=666)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(392,)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.shape(x_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(98,)"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.shape(x_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "SimpleLinearRegression2()"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from c2_linear_regression.simple_linear_regression import SimpleLinearRegression\n",
    "reg = SimpleLinearRegression()\n",
    "reg.fit(x_train, y_train)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7.8608543562689563"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg.a_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-27.45934280670555"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg.b_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD8CAYAAABn919SAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMS4xLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvAOZPmwAAIABJREFUeJztnXmYVOWVh9/TTQndqDQocWnFNkYxQYSOrVExJGCUUVE7IBijRkcGk+i4i2DiRBgXIIzRZIxbNC6DCwjSIholQWMSRxzBBpUIUSMgJSpRm6C20Ms3f9y6tfW9VbeWW7eW8z4PD32/usu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ABcKCIjgzbIB3oBXwduN8Y0Ap8B04I1yT8iLqVTgEeDtsUPRKQ/VhP6/YG9gb4iclawVuUfY8wbwGxgKfA0sAro8nq8CrrFCOAUEVkPPAKMFpG5wZrkH5HZDsaYD7H8rUcEa5EvbAI2GWNeimwvwBL4cuUE4BVjzAdBG+IT3wHeMcZsMcZ0AI8BRwdsky8YY+4xxhxmjBkJfAL8zeuxKuiAMeZqY8w+xpgGrK+tzxpjyu7pDyAifUVkF/tn4Hisr3llhTHmfeBdERkcGToW+GuAJvnNGZSpuyXCRuBIEakVEcH6PN8I2CZfEJEvRf4fhOU/f8jrsZrlUnnsASyy/iboBTxkjHk6WJN84yLgwYg74u/AvwZsjy9EHszHAT8M2ha/MMa8JCILgFeATqCV8l0xulBEdgM6gAszCebrSlFFUZQyQV0uiqIoZYIKuqIoSpmggq4oilImqKAriqKUCSroiqIoZYIKuqIoSpmggq4oilImqKAriqKUCf8P0WEmqNhEopEAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x1091048d0>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x_train, y_train)\n",
    "plt.plot(x_train, reg.predict(x_train), color='r')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "y_predict = reg.predict(x_test)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### MSE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "24.15660213438743"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mse_test = np.sum((y_predict - y_test)**2)/len(y_test)\n",
    "mse_test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "24.15660213438743"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mse_test_2 = (y_predict - y_test).dot(y_predict - y_test)/len(y_test)\n",
    "mse_test_2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### RMSE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "4.914936635846634"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from math import sqrt\n",
    "\n",
    "rmse_test = sqrt(mse_test)\n",
    "rmse_test"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### MAE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.5430974409463873"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mae_test = np.sum(np.absolute(y_predict - y_test)) / len(y_test)\n",
    "mae_test"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### scikit-learn中的MSE和MAE"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics.scorer import mean_squared_error\n",
    "from sklearn.metrics.scorer import mean_absolute_error"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "24.15660213438743"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mean_squared_error(y_test, y_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3.5430974409463873"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mean_absolute_error(y_test, y_predict)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### R Square"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "from playML.metrics import r2_score"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.61293168039373236"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r2_score(y_test, y_predict)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### scikit-learn中的R Square"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics.scorer import r2_score as r2s"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.61293168039373236"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r2s(y_test,y_predict)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
